快速进入k8s docker容器脚本
#!/bin/bash
# 快速进入k8s docker容器脚本
echo "entering k8s docker "$1

CONTAINER_ID=$(kubectl get pod -n ns-retail-master -o wide|grep v7-$1|awk '{print $1}')
kubectl exec -it ${CONTAINER_ID} -n ns-retail-master /bin/bash

#!/bin/bash
# 快速进入k8s docker容器脚本
echo "entering k8s docker "$1

CONTAINER_ID=$(kubectl get pod -n ns-retail-dev -o wide|grep v7-$1|awk '{print $1}')
kubectl exec -it ${CONTAINER_ID} -n ns-retail-dev /bin/bash

#!/bin/bash
# 快速进入k8s docker容器脚本
echo "entering k8s docker "$1

CONTAINER_ID=$(kubectl get pod -n ns-retail-feature1 -o wide|grep v7-$1|awk '{print $1}'|head -n 1)
kubectl exec -it ${CONTAINER_ID} -n ns-retail-feature1 /bin/bash